<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Drag</title>

  <style>
    .container {
      width: 300px;
      height: 300px;
      background: rgba(0, 0, 0, 0.1);
    }

    .el {
      margin: auto;
      width: 50px;
      height: 50px;
      background-color: red;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="el"></div>
  </div>
</body>

<script type="module">
  import { Drag } from '../dist/index.js'

  const el = document.querySelector('.el')
  const container = document.querySelector('.container')

  const drag = new Drag({
    el,
    container,
    sticky: true,
  })
</script>

</html>